package com.domain.oa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("菜单信息")
@TableName("sys_menu")
public class Menu implements Serializable {

    @ApiModelProperty("菜单id")
    @TableId(type = IdType.AUTO)
    private Integer menuId;

    @ApiModelProperty("菜单名称")
    @TableField("menu_name")
    private String menuName;

    @ApiModelProperty("菜单描述")
    @TableField("menu_desc")
    private String menuDesc;

    @ApiModelProperty("菜单地址")
    @TableField("menu_url")
    private String menuUrl;

    @ApiModelProperty("菜单图标")
    @TableField("menu_icon")
    private Integer menuIcon;

    @ApiModelProperty("菜单父子关系")
    @TableField("menu_pid")
    private Integer menuPid;

    @ApiModelProperty("创建时间")
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty("排序")
    @TableField("sort")
    private Integer sort;

    @ApiModelProperty("图标")
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    @TableField("icon_url")
    private Date icon;

    @ApiModelProperty("子菜单")
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    private List<Menu> children;

}
